home *** CD-ROM | disk | FTP | other *** search
/ Belgian Amiga Club - ADF Collection / BS1 part 60.zip / BS1 part 60 / Prof. Calc d1.adf / misc / DiskMount next >
AmigaDOS Script File  |  1991-12-12  |  1KB  |  60 lines

  1. .KEY english/A,check/A,asn/A,dest
  2. .BRA {
  3. .KET }
  4.  
  5. ; DiskMount - Ask user for a diskette.
  6. ;
  7. ; Asks the user to put a given diskette into {dest}, and then gives it
  8. ; a name which won't conflict with any standard assignments.
  9. ;
  10. ; Inputs:
  11. ;   english  What to ask the user for
  12. ;   check    The volume name the diskette must have
  13. ;   asn      The Assign name to give it
  14.  
  15. ; If we already know how to find the requested disk, don't specifically
  16. ; ask for it again in {dest}.
  17. ; Use ASSIGN EXISTS because we only care whether the name is known, not
  18. ; whether the diskette is accessible at the moment (if it isn't a DOS
  19. ; requester will remedy the situation).
  20.  
  21. echo >ENV:GDIRC "ok"
  22.  
  23. assign >NIL: {asn} exists
  24. if not warn
  25.     skip MountOK
  26. endif
  27.  
  28. failat 21
  29.  
  30. lab volagain
  31.  
  32. echo "Please insert {english}" noline
  33. echo " into drive *E[;1m{dest$DF0:}*E[m*NHit RETURN when ready, or N to abort:  " noline
  34. instutil ask ""
  35. if warn
  36.     skip MountAbort
  37. endif
  38.  
  39. assign PSInstVCheck: ""
  40. cd {dest$DF0:}
  41. cd >ram:PCalcInstall/VolumeCheck
  42. cd PSInstVCheck:
  43. assign PSInstVCheck:
  44.  
  45. instutil -eGDIVolCheck join ram:PCalcInstall/VolumeCheck
  46. if not $GDIVolCheck eq {check}
  47.     echo "*NWrong disk.  Try again."
  48.     skip back volagain
  49. endif
  50.  
  51. assign {asn} "{dest$DF0:}"    ; Hook we can use when disk has been removed
  52. skip MountOK
  53.  
  54. lab MountAbort
  55.    skip wrapup
  56.  
  57. lab MountOK
  58.  
  59. failat 10
  60.